package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DfTipoDocume generated by hbm2java
 */
@Entity
@Table(name = "DF_TIPO_DOCUME", schema = "DICTAMEN")
public class DfTipoDocume implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6230022127310550888L;
	private String ctipoDoc;
	private String stipoDoc;
	private String cusuario;
	private Date fhingreso;
	private Integer breqAnexo;
	private Set<DfDocumento> dfDocumentos = new HashSet<DfDocumento>(0);

	public DfTipoDocume() {
	}

	public DfTipoDocume(String ctipoDoc, String stipoDoc, String cusuario,
			Date fhingreso) {
		this.ctipoDoc = ctipoDoc;
		this.stipoDoc = stipoDoc;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public DfTipoDocume(String ctipoDoc, String stipoDoc, String cusuario,
			Date fhingreso, Integer breqAnexo, Set<DfDocumento> dfDocumentos) {
		this.ctipoDoc = ctipoDoc;
		this.stipoDoc = stipoDoc;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.breqAnexo = breqAnexo;
		this.dfDocumentos = dfDocumentos;
	}

	@Id
	@Column(name = "C_TIPO_DOC", unique = true, nullable = false, length = 2)
	public String getCtipoDoc() {
		return this.ctipoDoc;
	}

	public void setCtipoDoc(String ctipoDoc) {
		this.ctipoDoc = ctipoDoc;
	}

	@Column(name = "S_TIPO_DOC", nullable = false, length = 60)
	public String getStipoDoc() {
		return this.stipoDoc;
	}

	public void setStipoDoc(String stipoDoc) {
		this.stipoDoc = stipoDoc;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "B_REQ_ANEXO", precision = 1, scale = 0)
	public Integer getBreqAnexo() {
		return this.breqAnexo;
	}

	public void setBreqAnexo(Integer breqAnexo) {
		this.breqAnexo = breqAnexo;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dfTipoDocume")
	public Set<DfDocumento> getDfDocumentos() {
		return this.dfDocumentos;
	}

	public void setDfDocumentos(Set<DfDocumento> dfDocumentos) {
		this.dfDocumentos = dfDocumentos;
	}

}
